package com.data.center.dictionary;

import com.data.center.exception.exception.BizException;
import com.data.center.exception.info.CommonEnum;

/**
 * @author DN
 * @description:专业编码映射枚举类CD000084
 * @date 2023/11/30 17：00
 */
public enum MajorStudied implements KeyValueMap {
    PHILOSOPHY("0100", "哲学"),
    PHILOSOPHY_GENERAL("0101", "哲学类"),
    ECONOMICS("0200", "经济学"),
    ECONOMICS_GENERAL("0201", "经济学类"),
    ECONOMICS_FINANCE("0202", "财政学类"),
    ECONOMICS_FINANCE_FINANCE("0203", "金融学类"),
    ECONOMICS_TRADE("0204", "经济与贸易类"),
    LAW("0300", "法学"),
    LAW_GENERAL("0301", "法学类"),
    LAW_POLITICS("0302", "政治学类"),
    LAW_SOCIOLOGY("0303", "社会学类"),
    LAW_ETHNIC("0304", "民族学类"),
    LAW_MARXISM("0305", "马克思主义理论类"),
    LAW_PUBLIC_SECURITY("0306", "公安学类"),
    EDUCATION("0400", "教育学"),
    EDUCATION_GENERAL("0401", "教育学类"),
    EDUCATION_SPORTS("0402", "体育学类"),
    LITERATURE("0500", "文学"),
    LITERATURE_CHINESE("0501", "中国语言文学类"),
    LITERATURE_FOREIGN("0502", "外国语言文学类"),
    LITERATURE_COMMUNICATION("0503", "新闻传播学类"),
    HISTORY("0600", "历史学"),
    HISTORY_GENERAL("0601", "历史学类"),
    SCIENCE("0700", "理学"),
    SCIENCE_MATH("0701", "数学类"),
    SCIENCE_PHYSICS("0702", "物理学类"),
    SCIENCE_CHEMISTRY("0703", "化学类"),
    SCIENCE_ASTRONOMY("0704", "天文学类"),
    SCIENCE_GEOGRAPHY("0705", "地理科学类"),
    SCIENCE_ATMOSPHERIC("0706", "大气科学类"),
    SCIENCE_OCEANOGRAPHY("0707", "海洋科学类"),
    SCIENCE_GEOPHYSICS("0708", "地球物理学类"),
    SCIENCE_GEOLOGY("0709", "地质学类"),
    SCIENCE_BIOLOGY("0710", "生物科学类"),
    SCIENCE_PSYCHOLOGY("0711", "心理学类"),
    SCIENCE_STATISTICS("0712", "统计学类"),
    ENGINEERING("0800", "工学"),
    ENGINEERING_MECHANICS("0801", "力学类"),
    ENGINEERING_MECHANICAL("0802", "机械类"),
    ENGINEERING_INSTRUMENT("0803", "仪器类"),
    ENGINEERING_MATERIAL("0804", "材料类"),
    ENGINEERING_ENERGY("0805", "能源动力类"),
    ENGINEERING_ELECTRICAL("0806", "电气类"),
    ENGINEERING_ELECTRONICS("0807", "电子信息类"),
    ENGINEERING_AUTOMATION("0808", "自动化类"),
    ENGINEERING_COMPUTER("0809", "计算机类"),
    ENGINEERING_CIVIL("0810", "土木类"),
    ENGINEERING_WATER("0811", "水利类"),
    ENGINEERING_SURVEYING("0812", "测绘类"),
    ENGINEERING_CHEMICAL("0813", "化工与制药类"),
    ENGINEERING_GEOLOGY("0814", "地质类"),
    ENGINEERING_MINING("0815", "矿业类"),
    ENGINEERING_TEXTILE("0816", "纺织类"),
    ENGINEERING_LIGHT("0817", "轻工类"),
    ENGINEERING_TRANSPORTATION("0818", "交通运输类"),
    ENGINEERING_MARINE("0819", "海洋工程类"),
    ENGINEERING_AEROSPACE("0820", "航空航天类"),
    ENGINEERING_WEAPON("0821", "兵器类"),
    ENGINEERING_NUCLEAR("0822", "核工程类"),
    ENGINEERING_AGRICULTURAL("0823", "农业工程类"),
    ENGINEERING_FORESTRY("0824", "林业工程类"),
    ENGINEERING_ENVIRONMENTAL("0825", "环境科学与工程类"),
    ENGINEERING_BIOMEDICAL("0826", "生物医学工程类"),
    ENGINEERING_FOOD("0827", "食品科学与工程类"),
    ENGINEERING_ARCHITECTURE("0828", "建筑类"),
    ENGINEERING_SAFETY("0829", "安全科学与工程类"),
    ENGINEERING_BIOLOGY("0830", "生物工程类"),
    ENGINEERING_PUBLIC_SECURITY("0831", "公安技术类"),
    AGRICULTURE("0900", "农学"),
    AGRICULTURE_PLANT("0901", "植物生产类"),
    AGRICULTURE_NATURAL("0902", "自然保护与环境生态类"),
    AGRICULTURE_ANIMAL("0903", "动物生产类"),
    AGRICULTURE_VETERINARY("0904", "动物医学类"),
    AGRICULTURE_FORESTRY("0905", "林学类"),
    AGRICULTURE_FISHERY("0906", "水产类"),
    AGRICULTURE_GRASS("0907", "草学类"),
    MEDICINE("1000", "医学"),
    MEDICINE_BASIC("1001", "基础医学类"),
    MEDICINE_CLINICAL("1002", "临床医学类"),
    MEDICINE_DENTAL("1003", "口腔医学类"),
    MEDICINE_PUBLIC_HEALTH("1004", "公共卫生与预防医学类"),
    MEDICINE_CHINESE("1005", "中医学类"),
    MEDICINE_CHINESE_WESTERN("1006", "中西医结合类"),
    MEDICINE_PHARMACY("1007", "药学类"),
    MEDICINE_CHINESE_PHARMACY("1008", "中药学类"),
    MEDICINE_FORENSIC("1009", "法医学类"),
    MEDICINE_MEDICAL_TECHNOLOGY("1010", "医学技术类"),
    MEDICINE_NURSING("1011", "护理学类"),
    MILITARY("1100", "军事学"),
    MILITARY_THOUGHT_HISTORY("1101", "军事思想及军事历史"),
    MILITARY_STRATEGY("1102", "战略学"),
    MILITARY_CAMPAIGN("1103", "战役学"),
    MILITARY_TACTICS("1104", "战术学"),
    MILITARY_ARMY_COMMAND("1105", "军队指挥书"),
    MILITARY_SCIENCE("1106", "军事学"),
    MILITARY_POLITICAL("1107", "军队政治工作学"),
    MILITARY_LOGISTICS("1108", "军队后勤学"),
    MILITARY_EQUIPMENT("1109", "军事装备学"),
    MILITARY_TRAINING("1110", "军事训练学"),
    MANAGEMENT("1200", "管理学"),
    MANAGEMENT_SCIENCE_ENGINEERING("1201", "管理科学与工程类"),
    MANAGEMENT_BUSINESS("1202", "工商管理类"),
    MANAGEMENT_AGRICULTURAL_ECONOMICS("1203", "农业经济管理类"),
    MANAGEMENT_PUBLIC("1204", "公共管理类"),
    MANAGEMENT_LIBRARY_ARCHIVE("1205", "图书情报与档案管理类"),
    MANAGEMENT_LOGISTICS("1206", "物流管理与工程类"),
    MANAGEMENT_INDUSTRIAL_ENGINEERING("1207", "工业工程类"),
    MANAGEMENT_E_COMMERCE("1208", "电子商务类"),
    MANAGEMENT_TOURISM("1209", "旅游管理类"),
    ART("1300", "艺术学"),
    ART_THEORY("1301", "艺术学理论类"),
    ART_MUSIC_DANCE("1302", "音乐与舞蹈学类"),
    ART_DRAMA_FILM("1303", "戏剧与影视学类"),
    ART_FINE_ART("1304", "美术学类"),
    ART_DESIGN("1305", "设计学类"),
    INTERDISCIPLINARY("1400", "交叉学科"),
    INTERDISCIPLINARY_IC("1401", "集成电路科学与工程"),
    INTERDISCIPLINARY_NATIONAL_SECURITY("1402", "国家安全学");

    private String code;
    private String name;

    MajorStudied(String code, String name) {
        this.code = code;
        this.name = name;
    }

    @Override
    public String getKey() {
        return code;
    }

    @Override
    public String getValue() {
        return name;
    }

    public static MajorStudied getValueByKey(String key) {
        for (MajorStudied majorStudied : values()) {
            if (majorStudied.code.equals(key)) {
                return majorStudied;
            }
        }
        throw new BizException(CommonEnum.CAN_NOT_FIND_IN_DICTIONARY);
    }

    public static MajorStudied getKeyByValue(String value) {
        for (MajorStudied majorStudied : values()) {
            if (majorStudied.name.equals(value)) {
                return majorStudied;
            }
        }
        throw new BizException(CommonEnum.CAN_NOT_FIND_IN_DICTIONARY);
    }
}
